The subject invention relates to an apparatus and method for printing an improved two-dimensional barcode and to articles marked with such barcode. More particularly it relates to such apparatus, method and articles where dimensions of modules comprising such barcode are selectively reduced to compensate for module growth during printing.
The use of printed barcodes to mark articles with information in a manner, which is easily machine-readable, is well known. Almost every article sold by a supermarket or department store is marked with a Product Identification Code, which is scanned at the time of sale to determine the price and for inventory control. For such applications, where the amount of information to be scanned is relatively small, simple, one-dimensional barcodes, which are simple to print and easily scanned, have proven adequate. However as the range of applications using barcodes has grown, the need for barcode formats with greater information density has increased. One such application is the need to print substantial amounts of machine-readable postal information in a limited area on a mail piece. In response to this and other needs, various two-dimensional barcode formats, (hereinafter sometimes xe2x80x9c2D-barcodexe2x80x9d), such as Data Matrix 2D Barcodes based on the AIM International Technical Specificationxe2x80x94International Symbology Specificationxe2x80x94marketed by AIM International, Inc; or PDF-417 symbology based on the Uniform Symbology Specification PDF-417 by AIM USA, have been developed.
FIGS. 1A and 1B illustrate such two-dimensional barcode formats. In FIG. 1A, data to be printed as 2D-barcode is arranged as array 10 of data bits DATA(i,j) having I columns and J rows. FIG. 1B shows an array 12 of modules M(i,j) corresponding to a 2D-barcode having I columns and J rows of modules in one-to-one correspondence with data array 10. Each of modules M(i,j) comprises an array of pixel values P(x,y) having X columns and Y rows. Typically, if DATA(i,j) is asserted, i.e. equals 1, then corresponding module M(i,j) is printed, and otherwise is left unprinted. (Printed values for P(x,y) are shown as xe2x80x9c*xe2x80x9d.)
Details of particular 2D-barcode formats are not relevant to the present invention except to note that each printed barcode will comprise an apparently random array of printed and unprinted modules; and that, because of the need to limit the area of the 2D-barcode, each module will typically be only a few print elements (hereinafter sometimes xe2x80x9cpixelsxe2x80x9d) in height and width. Thus the tendency of printed modules to xe2x80x9cgrowxe2x80x9d or xe2x80x9cbleedxe2x80x9d into adjacent unprinted modules can be a source of significant error in scanning of 2D-barcodes.
While it is known to xe2x80x9cthinxe2x80x9d, i.e. reduce in size, printed modules which are adjacent to unprinted modules, it is a computationally extensive and slow process requiring substantial memory space to examine an entire data array and form a bit map image of the 2D-barcode where printed modules are appropriately thinned. This problem is particularly acute in applications such as digital postage meters which print 2D-barcode on mail pieces and which are limited both in processing power and available memory.
Thus, it is an object of the subject invention to provide a method and apparatus for converting a column, or row, (hereinafter sometimes generally xe2x80x9csequencexe2x80x9d) of a data array into a corresponding column, or row, of modules of a 2D-barcode and appropriately thinning printed modules in the column, or row, xe2x80x9con the flyxe2x80x9d without need to examine the entire data array or form a bit map image of the entire 2D barcode. It is another object of the subject invention to provide articles such as mailpieces, which incorporate such barcode.
The above object is achieved and the disadvantages of the prior art are overcome in accordance with the subject invention by a method, and a system for carrying out the method, for generating and outputting a bitstream corresponding to a 2D-barcode having I first sequences of modules and J second sequences of said modules substantially orthogonal to said first sequences, each of said modules having a one-to-one correspondence with a bit in a binary data array and comprising X first sequences of pixels substantially parallel to said first sequences of said modules and Y second sequences of said pixels substantially parallel to said second sequences of said modules. A bit map corresponding to an initial first sequence of said modules and comprising binary pixel values P(x,y) is generated. For each module in said initial first sequence, all P(x,y) equal 0 if said corresponding data bits are not asserted. Otherwise, for first pixel sequences P(1) through P(Xxe2x88x92H), where H is in the range 0 to Xxe2x88x921, all P(x,y), equal 1; for first pixel sequences P(Xxe2x88x92H+1) through P(X), all P(x,y) in second pixel sequences P(1) through P(Yxe2x88x92V), where V is in the range 0 to Yxe2x88x921, equal 1 if a corresponding data bit for an adjacent module in a next first sequence equals 1, and otherwise equal 0; and for first pixel sequences P(Xxe2x88x92H+1) through P(X), all P(x,y) in second pixel sequences P(Yxe2x88x92V+1) through P(Y) equal 0 if said corresponding data bit for an adjacent module in said next first sequence equals 0, or if said corresponding data bit for a diagonally adjacent module in said next first sequence equals 0. The bit map is output as a bitstream by: for each module in said initial first module sequence setting all P(x,y) in said second pixel sequences P(Yxe2x88x92V+1) through P(Y)=0 if a data bit corresponding to a next module in said initial first sequence=0; for each module in said initial first module sequence outputting an initial first pixel sequence; repeating step b2 for each remaining first pixel sequence; and repeating steps a and b for each remaining first module sequence. H and V are not both equal to 0.
In accordance with one aspect of the subject invention said first module sequences are columns substantially transverse to a print direction.
In accordance with another aspect of the subject invention said columns are printed using an inkjet printhead having a linear array of nozzles for printing a plurality of pixels substantially at one time.
In accordance with another aspect of the subject invention said first module sequences are rows substantially parallel to a print direction.
In accordance with another aspect of the subject invention said columns are printed using a printhead having a mechanism for printing single pixel rows.
Other objects and advantages of the subject invention will be apparent to those skilled in the art from consideration of the detailed description set forth below and the attached drawings.